package repository;

import com.xgggh.redpack.domain.auth.Profile;
import javax.inject.Inject;
import io.reactivex.Flowable;
import model.Rsp;
import retrofit2.Retrofit;
import service.ProfileService;


public class ProfileRepository extends BaseRepository{

    Retrofit retrofit;

    @Inject
    public ProfileRepository(Retrofit retrofit) {
        this.retrofit = retrofit;
    }

    public Flowable <Rsp<Profile>> getProfile() {
        return retrofit.create(ProfileService.class)
                .getProfile()
                .compose(ioTransformer());
    }
}
